<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>search</title>
    <link rel="StyleSheet" href="../css/catalog.css" type="text/css" media="screen" />
    <link rel="StyleSheet" href="../css/common.css" type="text/css" media="screen" />
    <script src="/js/jquery-3.6.0.min.js"></script>
<!--    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>-->
</head>
<body>
<div th:replace="common/top1"></div>
<div id="w">
    <div id="BackLink">
        <a href="/index">Return to Main Menu</a>
    </div>
    <div id="Catalog">
        <table class="showGoods">
            <tr id="head">
                <th> </th>
                <th>Category</th>
                <th>Product ID</th>
                <th>Name</th>
            </tr>
            <tr th:if="${#lists.isEmpty(productList)}">
                <td colspan="4"><b>搜索结果为空</b></td>
            </tr>
            <tr th:each="product:${productList}">
                <td><img th:src="${product.descn}"></td>
                <td th:text="${product.category}"></td>
                <td>
                    <a class="catalogTableLink" th:href="@{/productForm(productId=${product.productid})}" th:text="${product.productid}">productId</a>
                </td>
                <td th:text="${product.name}">product name</td>
            </tr>
        </table>
    </div>
</div>
</div>

<div th:replace="common/bottom"></div>
<script src="../js/searchBykeyWord.js"></script>
</body>
</html>
<!--            <tr id="head">-->
<!--                <th>Item ID</th>-->
<!--                <th>Product ID</th>-->
<!--                <th>Name</th>-->
<!--                <th>Description</th>-->
<!--                <th>List Price</th>-->
<!--                <th>&nbsp;</th>-->
<!--            </tr>-->
<!--            <tr th:each="item:${itemList}">-->
<!--                <td>-->
<!--                    <a th:href="@{itemForm(itemId=${item.itemId})}" th:text="${item.itemName}">itemName</a>-->
<!--                </td>-->
<!--                <td th:text="${item.product.productId}">item.product.productId</td>-->
<!--                <td th:text="${item.attribute1} + ' ' + ${item.attribute2} + ' ' + ${item.attribute3} + ' ' + ${item.attribute4} + ' ' + ${item.attribute5} ">-->
<!--                                   item.attribute1-4-->
<!--                </td>-->
<!--                <td th:text="${product.name}">product name</td>-->
<!--                <td th:text="${#numbers.formatDecimal(item.listPrice, 2, 'COMMA', '$')}">price</td>-->
<!--                <td>-->
<!--                    <a href="addItemToCart?workingItemId=${item.itemId}&token=${sessionScope.token}" class="Button">Add to Cart</a>-->
<!--                </td>-->
<!--            </tr>-->